<%-- 
    Document   : actionAddSubSub
    Created on : Oct 28, 2009, 4:18:42 PM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            int id = Integer.parseInt(request.getParameter("subID"));
            String subName = request.getParameter("subSubName");
        %>
        <jsp:useBean id="SubObj1" class="DAO.DAOAction" scope="request" />
        <jsp:useBean id="SubObj2" class="DAO.Insert" scope="request" />
        <jsp:setProperty name="SubObj2" property="subID" value="<%=id%>" />
        <jsp:setProperty name="SubObj2" property="subName" value="<%=subName%>" />
        <%
            if (SubObj1.insertSubSubject2(SubObj2) == true) {
                response.sendRedirect("../displaySubSubject.jsp?id="+id);
            } else {
                out.println("Khong thanh cong");

            }
        %>
    </body>
</html>
